import 'package:flutter/material.dart';
import 'package:trip_flutter/util/screen_adapt_helper.dart';
import 'package:trip_flutter/util/spaceBox.dart';

class Screenpage extends StatefulWidget {
  const Screenpage({super.key});

  @override
  State<Screenpage> createState() => _ScreenpageState();
}

class _ScreenpageState extends State<Screenpage> {
  @override
  Widget build(BuildContext context) {
    ScreenHelper.init(context);
    return Scaffold(
      appBar: AppBar(title: Text("screen")),
      body: Center(
        child: Column(
          children: [
            Container(
              width: 200,
              height: 200,
              decoration: BoxDecoration(color: Colors.orange),
              child: Text("默认大小"),
            ),
            spaceBox(h: 30),
            Container(
              width: 200.px,
              height: 200.px,
              decoration: BoxDecoration(color: Colors.blue),
              child: Text("fit后的大小"),
            ),
          ],
        ),
      ),
    );
  }
}
